package cn.aitstone.controller;

import cn.aitstone.entity.User;
import cn.aitstone.feign.UserFeignClient;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
public class OrderController {
    private UserFeignClient userFeignClient;

    @GetMapping("/getByUserId/{id}")
    public User getByUserId(@PathVariable Long id){
        return userFeignClient.getByUserId(id);
    }
}
